package com.ziqikeji.xianyan.repository.comment;

import com.ziqikeji.xianyan.common.BaseDao;
import com.ziqikeji.xianyan.entity.comment.Comment;
import com.ziqikeji.xianyan.enumeration.DeleteFlagEnum;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 评论 dao
 *
 * @author liuyu
 */
@Repository
public interface CommentDao extends BaseDao<Comment, String> {

    /**
     * 获取文章下的所有评论
     *
     * @param articleId      文章ID
     * @param deleteFlagEnum 删除标记
     * @return 评论列表
     */
    List<Comment> findCommentsByArticleIdAndDeleteFlagEnum(String articleId, DeleteFlagEnum deleteFlagEnum);
}
